import http from '../../utils/request/request'


//获取企业员工信息
export function getEnterpriseStaffInfo(){
    return http({
        url: '/authority/enterprise/enterprise',
        method: 'get',
        headers: {'X-Custom-Header': localStorage.getItem("Ip")}
    })
} 

//分页获取企业员工信息
export function getEnterpriseStaffInfoByPage(size, page){
    return http({
        url:`/authority/enterprise/enterprise/${page}/${size}`,
        method: 'get',
        headers: {'X-Custom-Header': localStorage.getItem("Ip")}
    })
} 

//开除员工
export function deleteStaff(id){
    return http({
        url:`/authority/enterprise/shift/${id}`,
        method: 'put',
        headers: {'X-Custom-Header': localStorage.getItem("Ip")}
    })
} 

//生成基地邀请码
export function getInviteCode(){
    return http({
        url:'/authority/enterprise/inviteCode',
        method:'get'
    })
}

//通过邀请码加入基地
export function joinEnterprise(inviteCode){
    return http({
        url:`/authority/user/join/${inviteCode}`,
        method:'put'
    })
}